New function space options for coordinate fields#238
Draft
tommbendall wants to merge 11 commits intoMetOffice:mainfrom
Draft
New function space options for coordinate fields#238tommbendall wants to merge 11 commits intoMetOffice:mainfrom
tommbendall wants to merge 11 commits intoMetOffice:mainfrom
Conversation
29 tasks
thomasmelvin
approved these changes
Jan 26, 2026
thomasmelvin
left a comment
There was a problem hiding this comment.
All the changes look good.
As a comment for future development I think it would be good if correctly specified the element order when creating functions spaces (instead of being built on a single element order for the derahm complex as was originally envisioned).
i.e. The lowest order W0 space would be:
w0_fs = function_space_collection%get_fs(mesh, 1, 1, W0)
and our default Wtheta space would be
wt_fs = function_space_collection%get_fs(mesh, 0, 1, Wtheta)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Sci/Tech Reviewer: @thomasmelvin
Code Reviewer:
This adds two new options for the function spaces used by the coordinate fields:
When
Wthetais used as the function space, the vertical coordinate order is kept as 0, making the coordinates linear in the vertical. These options are an optimisation to the coordinate fields, which will facilitate us moving tocoord_order=2which gives a significant boost in NWP score:Wthetaspace allows us to have fewer DoFs per cell (see below)Linked to MetOffice/lfric_apps#179
Test branch: the action of the upgrade macro can be seen on my test branch here: https://github.com/tommbendall/lfric_core/pull/2/changes
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_core - test_coord_space/run4
Suite Information
Task Information
✅ succeeded tasks - 372
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review